package com.lcy.demo.annotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by PC on 2017/3/29.
 */
@Service
public class UserServiceImpl implements UserService{
    private UserMapper userMapper;

    @Override
    public Integer insertUser(String name, Integer age, Integer gender) {
        return userMapper.insertUser(name,age,gender);
    }

    @Override
    public User getUser(Integer id) {
        return userMapper.getUser(id);
    }

    @Autowired
    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }
}
